﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.RoboticOperationMerge.CApROMExcelManager
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using Microsoft.CSharp.RuntimeBinder;
using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Olp;


namespace DnProcessSimulateCommands.RoboticOperationMerge;

internal class CApROMExcelManager
{
  private int m_columnIndexName;
  private int m_columnIndexPosition;
  private int m_columnIndexOrientation;
  private int m_columnIndexExternalAxis;
  private int m_columnIndexRobotConfig;
  private int m_columnIndexRoboticParams;
  private int m_columnIndexOLPCommands;
  private int m_columnIndexAttributes;
  private int m_columnIndexTaughtPosition;
  private char[] m_enter = new char[1]{ '\n' };
  internal Application m_XL;
  private CultureInfo m_oldCI;
  private _Worksheet m_Worksheet;
  private int m_rowIndex;
  private Queue<Action> m_printActions = new Queue<Action>();

  internal void InitExcel()
  {
    this.m_oldCI = Thread.CurrentThread.CurrentCulture;
    this.m_XL = (Application) Activator.CreateInstance(Marshal.GetTypeFromCLSID(new Guid("00024500-0000-0000-C000-000000000046")));
    Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
    // ISSUE: reference to a compiler-generated method
    // ISSUE: variable of a compiler-generated type
    _Workbook workbook = (_Workbook) this.m_XL.Workbooks.Add((object) Missing.Value);
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__14.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__14.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, _Worksheet>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (_Worksheet), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    this.m_Worksheet = CApROMExcelManager.\u003C\u003Eo__14.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__14.\u003C\u003Ep__0, workbook.ActiveSheet);
    this.m_Worksheet.Name = "Robotic Operation Merge";
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__14.\u003C\u003Ep__1 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__14.\u003C\u003Ep__1 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__14.\u003C\u003Ep__1.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__14.\u003C\u003Ep__1, this.m_Worksheet.Cells[(object) 2, (object) 3]);
    // ISSUE: reference to a compiler-generated method
    range.Activate();
    range.Application.ActiveWindow.FreezePanes = true;
  }

  internal void InitColumnHeaders(
    Func<bool> ShouldInsertNameColumn,
    Func<bool> ShouldInsertPositionColumn,
    Func<bool> ShouldInsertOrientationColumn,
    Func<bool> ShouldInsertExternalAxisColumn,
    Func<bool> ShouldInsertOLPCommandsColumn,
    Func<bool> ShouldInsertRoboticParametersColumn,
    Func<bool> ShouldInsertTaughtPositionAndOrientationColumn,
    Func<bool> ShouldInsertConfigurationColumn,
    Func<bool> ShouldInsertAttributesColumn)
  {
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__15.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__15.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__15.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__15.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 1, (object) 1]);
    int ColumnOffset1 = 0;
    // ISSUE: reference to a compiler-generated method
    this.m_Worksheet.get_Range((object) "B1", (object) "B1").EntireColumn.Font.Bold = (object) true;
    // ISSUE: reference to a compiler-generated method
    this.m_Worksheet.get_Range((object) "A1", (object) "A1").EntireRow.Font.Bold = (object) true;
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset1).Value2 = (object) "Parent operation";
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset1).ColumnWidth = (object) 18;
    int ColumnOffset2 = ColumnOffset1 + 1;
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset2).Value2 = (object) "Merged object";
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset2).ColumnWidth = (object) 45;
    int ColumnOffset3 = ColumnOffset2 + 1;
    if (ShouldInsertNameColumn())
    {
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) "Name";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).ColumnWidth = (object) 25;
      this.m_columnIndexName = ColumnOffset3;
      ++ColumnOffset3;
    }
    if (ShouldInsertPositionColumn())
    {
      this.m_columnIndexPosition = ColumnOffset3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) $"X [{TxApplication.Options.Units.LinearUnitName}]";
      int num1;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (num1 = ColumnOffset3 + 1)).Value2 = (object) $"Y [{TxApplication.Options.Units.LinearUnitName}]";
      int num2;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (num2 = num1 + 1)).Value2 = (object) $"Z [{TxApplication.Options.Units.LinearUnitName}]";
      ColumnOffset3 = num2 + 1;
    }
    if (ShouldInsertOrientationColumn())
    {
      this.m_columnIndexOrientation = ColumnOffset3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) $"RX [{TxApplication.Options.Units.AngularUnitName}]";
      int num3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (num3 = ColumnOffset3 + 1)).Value2 = (object) $"RY [{TxApplication.Options.Units.AngularUnitName}]";
      int num4;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (num4 = num3 + 1)).Value2 = (object) $"RZ [{TxApplication.Options.Units.AngularUnitName}]";
      ColumnOffset3 = num4 + 1;
    }
    if (ShouldInsertExternalAxisColumn())
    {
      this.m_columnIndexExternalAxis = ColumnOffset3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) "External Axis";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).ColumnWidth = (object) 30;
      int ColumnOffset4;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (ColumnOffset4 = ColumnOffset3 + 1)).Value2 = (object) "Depart External Axis";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset4).ColumnWidth = (object) 30;
      ColumnOffset3 = ColumnOffset4 + 1;
    }
    if (ShouldInsertOLPCommandsColumn())
    {
      this.m_columnIndexOLPCommands = ColumnOffset3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) "OLP Commands";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).ColumnWidth = (object) 30;
      ++ColumnOffset3;
    }
    if (ShouldInsertRoboticParametersColumn())
    {
      this.m_columnIndexRoboticParams = ColumnOffset3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) "Robotic Parameters";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).ColumnWidth = (object) 30;
      ++ColumnOffset3;
    }
    if (ShouldInsertTaughtPositionAndOrientationColumn())
    {
      this.m_columnIndexTaughtPosition = ColumnOffset3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) $"Teach_X [{TxApplication.Options.Units.LinearUnitName}]";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).ColumnWidth = (object) 15;
      int ColumnOffset5;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (ColumnOffset5 = ColumnOffset3 + 1)).Value2 = (object) $"Teach_Y[{TxApplication.Options.Units.LinearUnitName}]";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset5).ColumnWidth = (object) 15;
      int ColumnOffset6;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (ColumnOffset6 = ColumnOffset5 + 1)).Value2 = (object) $"Teach_Z[{TxApplication.Options.Units.LinearUnitName}]";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset6).ColumnWidth = (object) 15;
      int ColumnOffset7;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (ColumnOffset7 = ColumnOffset6 + 1)).Value2 = (object) $"Teach_RX [{TxApplication.Options.Units.AngularUnitName}]";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset7).ColumnWidth = (object) 15;
      int ColumnOffset8;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (ColumnOffset8 = ColumnOffset7 + 1)).Value2 = (object) $"Teach_RY [{TxApplication.Options.Units.AngularUnitName}]";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset8).ColumnWidth = (object) 15;
      int ColumnOffset9;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (ColumnOffset9 = ColumnOffset8 + 1)).Value2 = (object) $"Teach_RZ [{TxApplication.Options.Units.AngularUnitName}]";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset9).ColumnWidth = (object) 15;
      int ColumnOffset10;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) (ColumnOffset10 = ColumnOffset9 + 1)).Value2 = (object) "Dynamic Reference Frame";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset10).ColumnWidth = (object) 27;
      ColumnOffset3 = ColumnOffset10 + 1;
    }
    if (ShouldInsertConfigurationColumn())
    {
      this.m_columnIndexRobotConfig = ColumnOffset3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) "Configuration";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).ColumnWidth = (object) 25;
      ++ColumnOffset3;
    }
    if (ShouldInsertAttributesColumn())
    {
      this.m_columnIndexAttributes = ColumnOffset3;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).Value2 = (object) "Attributes";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) ColumnOffset3).ColumnWidth = (object) 20;
      int num = ColumnOffset3 + 1;
    }
  }

  internal void AddCall(Action toAdd) => this.m_printActions.Enqueue(toAdd);

  internal string IndexToString(int col, int row)
  {
    string str1 = "";
    int num = 65;
    char ch;
    if (col > 26)
    {
      string str2 = str1;
      ch = (char) (num + col / 26);
      string str3 = ch.ToString();
      str1 = str2 + str3;
    }
    string str4 = str1;
    ch = (char) (num + col % 26);
    string str5 = ch.ToString();
    return str4 + str5 + row.ToString();
  }

  internal void PostCopyDataPrintToExcel(ITxRoboticOperation source)
  {
    string Cell1 = this.IndexToString(0, this.m_rowIndex + 2);
    string Cell2 = this.IndexToString(this.m_Worksheet.UsedRange.Columns.Count - 1, this.m_rowIndex + 2);
    if (source != null)
    {
      // ISSUE: reference to a compiler-generated method
      this.m_Worksheet.get_Range((object) Cell1, (object) Cell2).Interior.ColorIndex = (object) 24;
      // ISSUE: reference to a compiler-generated method
      this.m_Worksheet.get_Range((object) this.IndexToString(0, this.m_rowIndex + 3), (object) this.IndexToString(this.m_Worksheet.UsedRange.Columns.Count - 1, this.m_rowIndex + 3)).Interior.ColorIndex = (object) 37;
      // ISSUE: reference to a compiler-generated field
      if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__0 == null)
      {
        // ISSUE: reference to a compiler-generated field
        CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
      }
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      // ISSUE: variable of a compiler-generated type
      Range range = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
      for (int index = 0; index < this.m_Worksheet.UsedRange.Columns.Count; ++index)
      {
        if (index != 0 && index != 1)
        {
          // ISSUE: reference to a compiler-generated method
          object obj1 = range.get_Offset((object) this.m_rowIndex, (object) index).Value2;
          // ISSUE: reference to a compiler-generated method
          object obj2 = range.get_Offset((object) (this.m_rowIndex + 1), (object) index).Value2;
          // ISSUE: reference to a compiler-generated field
          if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__4 == null)
          {
            // ISSUE: reference to a compiler-generated field
            CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__4 = CallSite<Func<CallSite, object, string>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.None, typeof (string), typeof (CApROMExcelManager)));
          }
          // ISSUE: reference to a compiler-generated field
          Func<CallSite, object, string> target1 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__4.Target;
          // ISSUE: reference to a compiler-generated field
          CallSite<Func<CallSite, object, string>> p4 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__4;
          // ISSUE: reference to a compiler-generated field
          if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__2 == null)
          {
            // ISSUE: reference to a compiler-generated field
            CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__2 = CallSite<Func<CallSite, object, bool>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.UnaryOperation(CSharpBinderFlags.None, ExpressionType.IsTrue, typeof (CApROMExcelManager), (IEnumerable<CSharpArgumentInfo>) new CSharpArgumentInfo[1]
            {
              CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string) null)
            }));
          }
          // ISSUE: reference to a compiler-generated field
          Func<CallSite, object, bool> target2 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__2.Target;
          // ISSUE: reference to a compiler-generated field
          CallSite<Func<CallSite, object, bool>> p2 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__2;
          // ISSUE: reference to a compiler-generated field
          if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__1 == null)
          {
            // ISSUE: reference to a compiler-generated field
            CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__1 = CallSite<Func<CallSite, object, object, object>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.NotEqual, typeof (CApROMExcelManager), (IEnumerable<CSharpArgumentInfo>) new CSharpArgumentInfo[2]
            {
              CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string) null),
              CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.Constant, (string) null)
            }));
          }
          // ISSUE: reference to a compiler-generated field
          // ISSUE: reference to a compiler-generated field
          object obj3 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__1.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__1, obj1, (object) null);
          object obj4;
          if (!target2((CallSite) p2, obj3))
          {
            obj4 = (object) "";
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__3 == null)
            {
              // ISSUE: reference to a compiler-generated field
              CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__3 = CallSite<Func<CallSite, object, object>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(CSharpBinderFlags.None, "ToString", (IEnumerable<Type>) null, typeof (CApROMExcelManager), (IEnumerable<CSharpArgumentInfo>) new CSharpArgumentInfo[1]
              {
                CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string) null)
              }));
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            obj4 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__3.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__3, obj1);
          }
          string str1 = target1((CallSite) p4, obj4);
          // ISSUE: reference to a compiler-generated field
          if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__8 == null)
          {
            // ISSUE: reference to a compiler-generated field
            CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__8 = CallSite<Func<CallSite, object, string>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.None, typeof (string), typeof (CApROMExcelManager)));
          }
          // ISSUE: reference to a compiler-generated field
          Func<CallSite, object, string> target3 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__8.Target;
          // ISSUE: reference to a compiler-generated field
          CallSite<Func<CallSite, object, string>> p8 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__8;
          // ISSUE: reference to a compiler-generated field
          if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__6 == null)
          {
            // ISSUE: reference to a compiler-generated field
            CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__6 = CallSite<Func<CallSite, object, bool>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.UnaryOperation(CSharpBinderFlags.None, ExpressionType.IsTrue, typeof (CApROMExcelManager), (IEnumerable<CSharpArgumentInfo>) new CSharpArgumentInfo[1]
            {
              CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string) null)
            }));
          }
          // ISSUE: reference to a compiler-generated field
          Func<CallSite, object, bool> target4 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__6.Target;
          // ISSUE: reference to a compiler-generated field
          CallSite<Func<CallSite, object, bool>> p6 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__6;
          // ISSUE: reference to a compiler-generated field
          if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__5 == null)
          {
            // ISSUE: reference to a compiler-generated field
            CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__5 = CallSite<Func<CallSite, object, object, object>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.BinaryOperation(CSharpBinderFlags.None, ExpressionType.NotEqual, typeof (CApROMExcelManager), (IEnumerable<CSharpArgumentInfo>) new CSharpArgumentInfo[2]
            {
              CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string) null),
              CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.Constant, (string) null)
            }));
          }
          // ISSUE: reference to a compiler-generated field
          // ISSUE: reference to a compiler-generated field
          object obj5 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__5.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__5, obj2, (object) null);
          object obj6;
          if (!target4((CallSite) p6, obj5))
          {
            obj6 = (object) "";
          }
          else
          {
            // ISSUE: reference to a compiler-generated field
            if (CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__7 == null)
            {
              // ISSUE: reference to a compiler-generated field
              CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__7 = CallSite<Func<CallSite, object, object>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(CSharpBinderFlags.None, "ToString", (IEnumerable<Type>) null, typeof (CApROMExcelManager), (IEnumerable<CSharpArgumentInfo>) new CSharpArgumentInfo[1]
              {
                CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string) null)
              }));
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            obj6 = CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__7.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__19.\u003C\u003Ep__7, obj2);
          }
          string str2 = target3((CallSite) p8, obj6);
          if (str1.Trim() != str2.Trim())
          {
            // ISSUE: reference to a compiler-generated method
            this.m_Worksheet.get_Range((object) this.IndexToString(index, this.m_rowIndex + 2), (object) this.IndexToString(index, this.m_rowIndex + 3)).Interior.ColorIndex = (object) 3;
          }
        }
      }
      this.m_rowIndex += 2;
    }
    else
    {
      // ISSUE: reference to a compiler-generated method
      this.m_Worksheet.get_Range((object) Cell1, (object) Cell2).Interior.ColorIndex = (object) 35;
      ++this.m_rowIndex;
    }
  }

  internal void PreCopyDataPrintToExcel(ITxRoboticOperation source, ITxRoboticOperation target)
  {
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__20.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__20.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__20.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__20.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    if (source != null)
    {
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) 0).Value2 = (object) ((ITxObject) ((ITxObject) target).Collection).Name;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) 0).ColumnWidth = (object) 18;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) (this.m_rowIndex + 1), (object) 0).Value2 = (object) ((ITxObject) ((ITxObject) target).Collection).Name;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) (this.m_rowIndex + 1), (object) 0).ColumnWidth = (object) 18;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) 1).Value2 = (object) $"{((ITxObject) target).Name} (Before Merge with {((ITxObject) source).Name})";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) 1).ColumnWidth = (object) 45;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) (this.m_rowIndex + 1), (object) 1).Value2 = (object) $"{((ITxObject) target).Name} (After Merge with {((ITxObject) source).Name})";
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) (this.m_rowIndex + 1), (object) 1).ColumnWidth = (object) 45;
    }
    else
    {
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) 0).Value2 = (object) ((ITxObject) ((ITxObject) target).Collection).Name;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) 0).ColumnWidth = (object) 18;
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) 1).Value2 = (object) (((ITxObject) target).Name + " (New Location )");
      // ISSUE: reference to a compiler-generated method
      range.get_Offset((object) this.m_rowIndex, (object) 1).ColumnWidth = (object) 30;
    }
  }

  internal void PrintTransformation(TxTransformation value, int rowShift = 0, int colShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    int ColumnOffset = this.m_columnIndexPosition + colShift;
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__21.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__21.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__21.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__21.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) ColumnOffset).Value2 = (object) Math.Round(value.Translation.X / TxApplication.Options.Units.LinearMultiplier, 2);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (ColumnOffset + 1)).Value2 = (object) Math.Round(value.Translation.Y / TxApplication.Options.Units.LinearMultiplier, 2);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (ColumnOffset + 2)).Value2 = (object) Math.Round(value.Translation.Z / TxApplication.Options.Units.LinearMultiplier, 2);
  }

  internal void PrintRotation(TxTransformation value, int rowShift = 0, int colShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    int ColumnOffset = this.m_columnIndexOrientation + colShift;
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__22.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__22.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__22.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__22.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) ColumnOffset).Value2 = (object) Math.Round(value.RotationRPY_XYZ.X / TxApplication.Options.Units.AngularMultiplier, 2);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (ColumnOffset + 1)).Value2 = (object) Math.Round(value.RotationRPY_XYZ.Y / TxApplication.Options.Units.AngularMultiplier, 2);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (ColumnOffset + 2)).Value2 = (object) Math.Round(value.RotationRPY_XYZ.Z / TxApplication.Options.Units.AngularMultiplier, 2);
  }

  internal void PrintTaughtTransformation(TxTransformation value, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    int indexTaughtPosition = this.m_columnIndexTaughtPosition;
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__23.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__23.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__23.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__23.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) indexTaughtPosition).Value2 = (object) Math.Round(value.Translation.X / TxApplication.Options.Units.LinearMultiplier, 2);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (indexTaughtPosition + 1)).Value2 = (object) Math.Round(value.Translation.Y / TxApplication.Options.Units.LinearMultiplier, 2);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (indexTaughtPosition + 2)).Value2 = (object) Math.Round(value.Translation.Z / TxApplication.Options.Units.LinearMultiplier, 2);
  }

  internal void PrintTaughtRotation(TxTransformation value, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    int ColumnOffset = this.m_columnIndexTaughtPosition + 3;
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__24.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__24.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__24.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__24.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) ColumnOffset).Value2 = (object) Math.Round(value.RotationRPY_XYZ.X / TxApplication.Options.Units.AngularMultiplier, 2);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (ColumnOffset + 1)).Value2 = (object) Math.Round(value.RotationRPY_XYZ.Y / TxApplication.Options.Units.AngularMultiplier, 2);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (ColumnOffset + 2)).Value2 = (object) Math.Round(value.RotationRPY_XYZ.Z / TxApplication.Options.Units.AngularMultiplier, 2);
  }

  internal string GetDepartExternalAxes(ITxRoboticLocationOperation locTarget)
  {
    string empty = string.Empty;
    foreach (string str in new TxOlpControllerUtilities().GetDepartureExternalAxesString(locTarget))
      empty += str;
    return empty;
  }

  internal void CopyDepartExternalAxesPrintToExcel(string externalAxis, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    if (externalAxis.Contains(new string(this.m_enter)))
      externalAxis = externalAxis.Remove(externalAxis.LastIndexOfAny(this.m_enter));
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__26.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__26.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__26.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__26.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (this.m_columnIndexExternalAxis + 1)).Value2 = (object) externalAxis;
  }

  internal string GetExternalAxes(ITxRoboticLocationOperation locTarget)
  {
    string empty = string.Empty;
    foreach (string str in new TxOlpControllerUtilities().GetExternalAxesString(locTarget))
      empty += str;
    return empty;
  }

  internal void CopyExternalAxesPrintToExcel(string externalAxis, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    if (externalAxis.Contains(new string(this.m_enter)))
      externalAxis = externalAxis.Remove(externalAxis.LastIndexOfAny(this.m_enter));
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__28.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__28.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__28.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__28.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) this.m_columnIndexExternalAxis).Value2 = (object) externalAxis;
  }

  internal void PrintRoboticParamsToExcel(string value, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    if (value.Contains(new string(this.m_enter)))
      value = value.Remove(value.LastIndexOfAny(this.m_enter));
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__29.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__29.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__29.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__29.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) this.m_columnIndexRoboticParams).Value2 = (object) value;
  }

  internal void PrintAttributesToExcel(string value, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    if (value.Contains(new string(this.m_enter)))
      value = value.Remove(value.LastIndexOfAny(this.m_enter));
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__30.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__30.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__30.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__30.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) this.m_columnIndexAttributes).Value2 = (object) value;
  }

  internal void CopyConfigurationPrintToExcel(string configuration, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__31.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__31.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__31.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__31.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) this.m_columnIndexRobotConfig).Value2 = (object) configuration;
  }

  internal string ConfigurationString(ITxRoboticOperation target)
  {
    return new TxOlpControllerUtilities().GetConfigurationString(target as ITxRoboticLocationOperation, true);
  }

  internal void CopyDynamicRefFramePrintToExcel(TxRoboticTxObjectParam objParam, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__33.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__33.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__33.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__33.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) (this.m_columnIndexTaughtPosition + 6)).Value2 = (object) objParam.Value.Name;
  }

  internal void PrintOLPCommandUIRepresentations(string allCommands, int rowShift = 0)
  {
    int RowOffset = this.m_rowIndex + rowShift;
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__34.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__34.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__34.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__34.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    if (allCommands.Contains(new string(this.m_enter)))
      allCommands = allCommands.Remove(allCommands.LastIndexOfAny(this.m_enter));
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) this.m_columnIndexOLPCommands).Value2 = (object) allCommands;
  }

  internal string AllOLPCommandUIRepresentations(ITxRoboticOperation target)
  {
    TxOlpControllerUtilities controllerUtilities = new TxOlpControllerUtilities();
    TxOlpCommandServices olpCommandServices = (TxOlpCommandServices) null;
    try
    {
      olpCommandServices = new TxOlpCommandServices(controllerUtilities.GetRobot((ITxOperation) target));
    }
    catch
    {
    }
    string str1 = "";
    if (target.Commands != null)
    {
      foreach (ITxObject command in (Collection<ITxObject>) target.Commands)
      {
        string str2 = "";
        switch (command)
        {
          case TxRoboticCompositeCommand _:
            TxRoboticCompositeCommand compositeCommand = command as TxRoboticCompositeCommand;
            try
            {
              if (olpCommandServices != null)
              {
                string[] commandRepresentation = olpCommandServices.GetCommandRepresentation((TxOlpCommandLayerRepresentation) 0, compositeCommand, (ITxOperation) target);
                if (commandRepresentation != null && commandRepresentation.Length != 0 && commandRepresentation[0].Length > 0)
                {
                  foreach (string str3 in commandRepresentation)
                  {
                    str2 += str3;
                    str2 += "  ";
                  }
                  break;
                }
                str2 += ((TxRoboticCommand) compositeCommand).Text;
                str2 += "  ";
                break;
              }
              break;
            }
            catch (Exception ex)
            {
              str2 = str2 + ((TxRoboticCommand) compositeCommand).Text + "  ";
              break;
            }
          case TxRoboticCommand _:
            str2 = str2 + (command as TxRoboticCommand).Text + "  ";
            break;
        }
        str1 = $"{str1}{str2}\n";
      }
    }
    return str1;
  }

  internal void ShowExcel()
  {
    this.m_Worksheet.UsedRange.VerticalAlignment = (object) XlVAlign.xlVAlignTop;
    this.m_Worksheet.UsedRange.Borders.LineStyle = (object) XlLineStyle.xlContinuous;
    // ISSUE: reference to a compiler-generated method
    this.m_Worksheet.get_Range((object) "A1", (object) "A1").EntireColumn.Font.Size = (object) 13;
    // ISSUE: reference to a compiler-generated method
    this.m_Worksheet.get_Range((object) "A1", (object) "A1").EntireRow.Font.Size = (object) 13;
    this.m_XL.Visible = true;
  }

  public void RestoreCultureThread()
  {
    if (this.m_oldCI == null)
      return;
    Thread.CurrentThread.CurrentCulture = this.m_oldCI;
  }

  internal void CopyNamePrintToExcel(string name, int rowShift = 0)
  {
    int RowOffset = rowShift + this.m_rowIndex;
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__38.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__38.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__38.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__38.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) RowOffset, (object) this.m_columnIndexName).Value2 = (object) name;
  }

  internal void LogRemovedObjects(Tuple<string, string, RemoveAction> objectData)
  {
    // ISSUE: reference to a compiler-generated field
    if (CApROMExcelManager.\u003C\u003Eo__39.\u003C\u003Ep__0 == null)
    {
      // ISSUE: reference to a compiler-generated field
      CApROMExcelManager.\u003C\u003Eo__39.\u003C\u003Ep__0 = CallSite<Func<CallSite, object, Range>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof (Range), typeof (CApROMExcelManager)));
    }
    // ISSUE: reference to a compiler-generated field
    // ISSUE: reference to a compiler-generated field
    // ISSUE: variable of a compiler-generated type
    Range range = CApROMExcelManager.\u003C\u003Eo__39.\u003C\u003Ep__0.Target((CallSite) CApROMExcelManager.\u003C\u003Eo__39.\u003C\u003Ep__0, this.m_Worksheet.Cells[(object) 2, (object) 1]);
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) this.m_rowIndex, (object) 1).Value2 = (object) objectData.Item1;
    // ISSUE: reference to a compiler-generated method
    range.get_Offset((object) this.m_rowIndex, (object) 2).Value2 = (object) objectData.Item2;
    string Cell1 = this.IndexToString(0, this.m_rowIndex + 2);
    string Cell2 = this.IndexToString(this.m_Worksheet.UsedRange.Columns.Count - 1, this.m_rowIndex + 2);
    if (objectData.Item3 == RemoveAction.Deleted)
    {
      // ISSUE: reference to a compiler-generated method
      this.m_Worksheet.get_Range((object) Cell1, (object) Cell2).Interior.ColorIndex = (object) 45;
    }
    else if (objectData.Item3 == RemoveAction.Moved)
    {
      // ISSUE: reference to a compiler-generated method
      this.m_Worksheet.get_Range((object) Cell1, (object) Cell2).Interior.ColorIndex = (object) 27;
    }
    else
    {
      // ISSUE: reference to a compiler-generated method
      this.m_Worksheet.get_Range((object) Cell1, (object) Cell2).Interior.ColorIndex = (object) 3;
    }
    ++this.m_rowIndex;
  }

  [DllImport("user32")]
  private static extern uint GetWindowThreadProcessId(int hWnd, out int lpdwProcessId);

  internal void KillExcel()
  {
    this.m_printActions.Clear();
    int lpdwProcessId = 0;
    int windowThreadProcessId = (int) CApROMExcelManager.GetWindowThreadProcessId(this.m_XL.Hwnd, out lpdwProcessId);
    Process.GetProcessById(lpdwProcessId)?.Kill();
  }

  internal void ActivateActions()
  {
    while (this.m_printActions.Count > 0)
      this.m_printActions.Dequeue()();
  }
}
